package com.ambulance.project.biz.dto.treat;

import com.ambulance.project.biz.entity.Hospital;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.beans.BeanUtils;

/***
 *  @description
 *  @author zhao
 *  @date: 2020/5/19
 *  @version: v1.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "会诊子系统登陆用户", description = "会诊子系统登陆用户")
public class TreatUserInfo {



    @ApiModelProperty(value = "医院名称")
    private String hospitalName;

    @ApiModelProperty(value = "科室")
    private String depart;

    @ApiModelProperty(value = "会诊账号")
    private String treatAccount;

    @ApiModelProperty(value = "联系人")
    private String relationName;

    @ApiModelProperty(value = "联系电话")
    private String relationPhone;

    @ApiModelProperty(value = "声网频道标识")
    private String treatChannel;

    @ApiModelProperty(value = "声网公共频道标识")
    private String publicChannel;

    @ApiModelProperty(value = "用户唯一标识")
    private String userMark;

    public static TreatUserInfo fromHospital(Hospital hospital){

        TreatUserInfo info = new TreatUserInfo();
        BeanUtils.copyProperties(hospital,info);
        /*
        info.setPatientLocal(patient.getPatientLocal());
        info.setMajorCase(patient.getMajorCase());
        info.setCheckResult(patient.getCheckResult());
        info.setFirstTreat(patient.getFirstTreat());
        info.setHospital(patient.getHospital());
        info.setAge(patient.getAge());
        info.setSex(patient.getSex());*/
        return info;
    }

}
